home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VIS082S.ARJ / MAKELOG.PAS < prev    next >
Pascal/Delphi Source File  |  1990-09-04  |  1KB  |  52 lines

  1. Program MakeLog;
  2.  
  3.   (* this program will make the file "MAKEDAT.PAS". It will be a
  4.      "Procedure" which is used as a include file in INIT.PAS which
  5.      contains all of the syslog.dat information. You MUST have
  6.      the syslog.dat file in the current directory in order to run
  7.      this program.
  8.  
  9.                   Ken
  10.                       *)
  11.  
  12. Uses Dos;
  13.  
  14. Var F1,F2:Text;
  15.     L:String[80];
  16.  
  17.     Procedure CheckStuff;
  18.     Var I:Integer;
  19.         M:String[80];
  20.     Begin
  21.     M:='';
  22.      For I:=1 to Length(L) Do
  23.        Begin
  24.        If L[I]=#39 then M:=M+#39;
  25.        M:=M+L[I];
  26.        End;
  27.      L:=M;
  28.      End;
  29.  
  30.  
  31. Begin
  32.   Assign(F1,'MakeDat.Pas');
  33.   ReWrite(F1);
  34.   Assign(F2,'SysLog.Dat');
  35.   Reset(F2);
  36.   WriteLn(F1,'     Procedure MakeSyslogDat;');
  37.   WriteLn(F1,'     Var T:Text;');
  38.   WriteLn(F1,'     Begin');
  39.     WriteLn(F1,'        Assign(T,''SysLog.Dat'');');
  40.   WriteLn(F1,'        ReWrite(T);');
  41.   While Not Eof(F2) Do
  42.     Begin
  43.       ReadLn(F2,L);
  44.       checkstuff;
  45.       WriteLn(F1,'        WriteLn(T,'''+L+''');');
  46.     End;
  47.   WriteLn(F1,'        TextClose(T);');
  48.   WriteLn(F1,'        WriteLn(Usr,''Finished Making Syslog.Dat File!'');');
  49.   WriteLn(F1,'      End;');
  50.   Close(F2);
  51.   Close(F1);
  52. End.